home *** CD-ROM | disk | FTP | other *** search
/ Die Ultimative Software-P…i Collection 1996 & 1997 / Die Ultimative Software-Pakete CD-ROM fur Atari Collection 1996 & 1997.iso / p / pov / povlisti.ngs / blap.pov < prev    next >
Encoding:
Text File  |  1992-08-11  |  6.1 KB  |  290 lines

  1. // Persistence Of Vision raytracer version 1.0 sample file.
  2. // written by Paul Cotterill
  3. // lots of help from various sample pov files.
  4. // Demonstrates blob sculpture and various mappings.
  5. // For the sake of simplicity the same gif image has been used for most textures.
  6. // I used 5 different gifs for the original picture,though some restraint might well improve it.
  7.  
  8. #include "colors.inc"
  9. #include "textures.inc"
  10. #include "shapes2.inc"
  11. #include "shapes.inc"
  12.  
  13. #declare Bi = 2
  14.  
  15. #declare Texture0 = /* Planar image map */
  16. texture { image_map { 0 gif "miro1.gif" once interpolate Bi } }
  17.  
  18. #declare Texture1 = /* Planar image map */
  19. texture { image_map { 0 gif "miro1.gif"  interpolate Bi } }
  20.  
  21. #declare Texture2 = /* Planar image map */
  22. texture { image_map { 0 gif "miro1.gif" once interpolate Bi } }
  23.  
  24. #declare Texture3 = /* Planar image map */
  25. texture { image_map { 0 gif "miro1.gif" once interpolate Bi } }
  26.  
  27. #declare Texture4 = /* Planar image map */
  28. texture { material_map { <1.0 -1.0 0> gif "miro1.gif"  interpolate 2
  29.     texture { color White }
  30.     texture { color MidnightBlue }
  31.     texture { color BrightGold } }
  32.     specular 0.4
  33.     roughness 0.5
  34.     translate <-0.5 -0.5 0>     // Center the image
  35.     scale < 2.0 1.5 2.0>
  36.     }
  37.  
  38. #declare Texture5 = /* Cylindrical image map */
  39. texture { image_map { 2 gif "miro1.gif" 
  40.     alpha 0 1.0
  41.     once interpolate Bi } }
  42.  
  43.  
  44. #declare DMF_Hyperboloid = quadric {  /* Like Hyperboloid_Y, but more curvy */
  45.    <1.0 -1.0  1.0>
  46.    <0.0  0.0  0.0>
  47.    <0.0  0.0  0.0>
  48.    -0.5
  49. }
  50.  
  51.  
  52. camera {
  53.    location  <-5  0 -30.0>
  54.    direction <0.0  0.0  2.0>
  55.    up        <0.0  1.0  0.0>
  56.    right     <1.33 0.0  0.0>
  57.    look_at <-1.0 -1.0 1.0>
  58. }
  59.  
  60. object {
  61.     light_source { <-14.0 2.0 -35>
  62.       colour White
  63.     spotlight
  64.     point_at <2.0 -2.0 2.0>
  65.     tightness 20
  66.     radius 30
  67.     falloff 30
  68.    }
  69. }
  70.  
  71.  
  72. object {
  73.     plane { <0  1 0> -9.5 }
  74.     texture { White_Marble }
  75. }
  76.  
  77. object {
  78.     plane { <0  1 0> 20.0 }
  79.     texture { White_Marble }
  80. }
  81.  
  82. object {
  83.     plane { <1 0 0> -15.0 }
  84.     texture { PinkAlabaster }
  85. }
  86.  
  87. object {
  88.    plane { <0 0 1> 0 }
  89.    clipped_by {
  90.       box { <0 0 -1> <1 1 1> }
  91.    }
  92.    texture { Texture0 }
  93.    translate <0 0 2.5>
  94.    scale <20 20 20>
  95.    translate <0 10.0 2.0>
  96.    color Red
  97. }
  98.  
  99. object {
  100.    plane { <0 0 1> 0 }
  101.    clipped_by {
  102.       box { <0 0 -1> <1 1 1> }
  103.    }
  104.    texture { Texture1 }
  105.    translate <0 0 2.5>
  106.    scale <20 20 20>
  107.    translate <0 -10 2.0>
  108.    color Red
  109. }
  110.  
  111. object {
  112.    plane { <0 0 1> 0 }
  113.    clipped_by {
  114.       box { <0 0 -1> <1 1 1> }
  115.    }
  116.    texture { Texture2 }
  117.    translate <0 0 2.5>
  118.    scale <20 20 20>
  119.    translate <-20 10 2.0>
  120.    color Red
  121. }
  122.  
  123. object {
  124.    plane { <0 0 1> 0 }
  125.    clipped_by {
  126.       box { <0 0 -1> <1 1 1> }
  127.    }
  128.    texture { Texture3 }
  129.    translate <0 0 2.5>
  130.    scale <20 20 20>
  131.    translate <-20 -10 2.0>
  132.    color Red
  133. }
  134.  
  135.  
  136.  
  137. // The image map has not been correctly applied to these planes
  138. // at the right side of the picture,but I thought I would leave them for the different effect.
  139. object {
  140.    plane { <1 0 0> 0 } 
  141.    clipped_by {
  142.       box { <0 0 -1> <1 1 1> }
  143.    }
  144.    texture { Texture3 }
  145.    translate <0 0 2.0>
  146.    scale <20 20 20>
  147.    translate <20 10 2.0>
  148.    color Red
  149. }
  150.  
  151. object {
  152.    plane { <1 0 0> 0 } 
  153.    clipped_by {
  154.       box { <0 0 -1> <1 1 1> }
  155.    }
  156.    texture { Texture1 }
  157.    translate <0 0 2.0>
  158.    scale <20 20 20>
  159.    translate <20 -10 2.0>
  160.    color Red
  161. }
  162.  
  163.  
  164. // The blob sculpture.
  165. object {
  166.    blob {
  167.       threshold 0.4
  168.       component 1.0 0.65 <0.25 0.25 0>
  169.       component 1.0 0.65 <-0.25 0.25 0>
  170.       component 1.0 0.75 <0 1.0 0>        
  171.       component 1.0 0.5 <0 1.5 0>
  172.       component 1.0 0.75 <0 1.5 0.75>
  173.       component 1.0 0.65 <0 1.65 1.25>
  174.       component 1.0 0.65 <0.5  1.5 0>
  175.       component 1.0 0.65 <-0.5 1.5 0>
  176.       component 1.0 0.75 <0 1.5 -0.75>
  177.       component 1.0 0.65 <0 1.65 -1.25>
  178.       component -1.0 0.5 <0 1.75 0.75>
  179.       component -1.0 0.5 <0 1.85 1.250>    
  180.       component -1.0 0.5 <0 1.75 -0.75>
  181.       component -1.0 0.5 <0 1.85 -1.25> 
  182.     sturm
  183.    }
  184.    texture {
  185.     
  186.       Silver_Metal
  187.       
  188.    }
  189.     scale <2.0 1.5 1.25>
  190.     bounded_by {
  191.         sphere { <0 0 0> 4.0 }
  192.     }
  193.    rotate <0 -60 0>
  194.    scale <3.0 3.0 3.0>
  195.    translate <-0.5 -8.25 2.5>
  196.     
  197. }
  198.  
  199. // This is the vase,the concept borrowed from Skyvase.pov.
  200. // The vase is painted with a texture map.
  201. composite {
  202.    object {
  203.  
  204.       union {
  205.          intersection {
  206.             plane { <0 1 0> 0.7 }
  207.             quadric { DMF_Hyperboloid scale <0.75 1.25 0.75> }
  208.             quadric { DMF_Hyperboloid scale <0.70 1.25 0.70> inverse }
  209.             plane { <0.0 1.0 0.0> -1.0 inverse }
  210.          }
  211.          quadric { Ellipsoid scale <1.5 1.75 1.5 > translate <0 -1.15 0> }
  212.       }
  213.  
  214.       scale <1.5 1.5 1.5>
  215.       texture {
  216.         
  217.  
  218.     Texture4
  219.       }
  220.       color Green
  221.    }
  222.  
  223.  
  224.  
  225.    bounded_by {
  226.       intersection {
  227.          Disk_Y
  228.          translate <0.0 -0.5 0.0> 
  229.          scale <5 15 5>
  230.       }
  231.    }
  232.     translate <-7.5 -2.50 1.0>
  233. }
  234.  
  235. object {  /* Stand for the vase */
  236.    intersection { Hexagon
  237.       rotate <0.0 0.0 -90.0>    /* Stand it on end (vertical)*/
  238.       rotate<0.0 -45.0 0.0>    /* Turn it to a pleasing angle */
  239.       scale<2.5 1.5 2.5>
  240.       translate<-7.5 -8.0 1.0>
  241.    }
  242.    texture {
  243.       Sapphire_Agate
  244.       scale <2.0 2.0 2.0>
  245.       ambient 0.2
  246.       diffuse 0.75
  247.       reflection 0.85
  248.    }
  249.    color red 1.0         
  250. }
  251.  
  252. // This demonstrates a simple bump map.
  253. composite {
  254. object {
  255.    sphere { <0.0  0.0  0.0>  5.0 }
  256.  
  257.    texture {    
  258.       color OldGold 
  259.       bump_map { <1.0 -1.0 0.0> gif "miro1.gif"
  260.          bump_size 20.0
  261.          interpolate 2.0
  262.       }
  263.       scale < 10.0 10.0 10.0 >     
  264.       translate < 5.0 -5.0 0.0 >    
  265.       ambient 0.2
  266.       diffuse 0.7
  267.       specular 0.6
  268.    }
  269.    translate <0.0 2.5 0.0>
  270. }
  271.  
  272. // A cylindrical image map,which tends to get lost in the larger picture.
  273. // The alpha value in the texture gives some resemblance to a chain.
  274. object {
  275.    quadric { Cylinder_Y }
  276.    clipped_by { box {<-2 0 -2> <2 1 2> } }
  277.    texture {
  278.       Texture5
  279.    }
  280.  
  281.    scale <1.25 25 1.25>
  282.    rotate <0 -45 0>
  283.  
  284.    color Red
  285. }
  286. scale <0.25 0.25 0.25>
  287. translate <5.0 2.5 2.5>
  288. }
  289.  
  290.